package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/sayhi")
    public String sayHi(){
        System.out.println("sayHi方法被执行了");
        return "你好世界";
    }

    @RequestMapping("/sayhello")
    public String sayHello(){
        System.out.println("sayHello方法被执行了");
        return "世界你好";
    }
}
